#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int f = 0;
	scanf("%d", &f);
	int c = 0;
	c = 5 / 9 * (f - 32);
	printf("%d", c);
	return 0;
}